package com.wms.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wms.entity.WEntryStore;
import com.wms.vo.WEntryStoreInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 入库单表(WEntryStore)表数据库访问层
 *
 * @author Li Xiaoyu
 * @since 2023-10-22 21:32:42
 */
@Mapper
public interface WEntryStoreDao extends BaseMapper<WEntryStore> {
    @Select("select a.id,a.in_id,a.create_time,b.`name`,c.product_name,a.p_num,a.p_price,a.total_price,a.creator," +
            "a.note from w_entry_store a,w_store b,w_product c where a.store_id=b.store_id and a.pid=c.product_id")
    List<WEntryStoreInfo> selectAll();

    @Select("SELECT DISTINCT in_id FROM w_entry_store ")
    int[] selectAllInId();

}

